package com.cq.hd.order.api.vo;

import com.cq.hd.common.serialize.Decimal2Serializer;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

@Data
public class OrderItemVo implements Serializable {

    @ApiModelProperty(value = "id")
    private Long id;

    @ApiModelProperty(value = "商家id")
    private Long businessId;

    @ApiModelProperty(value = "活动id")
    private Long activeId;

    @ApiModelProperty(value = "一级经纪人id")
    private Long agentId;

    @ApiModelProperty(value = "二级经纪人id")
    private Long agent2Id;

    @ApiModelProperty(value = "订单id")
    private Long orderId;

    @ApiModelProperty(value = "下单用户id")
    private Long userId;

    @ApiModelProperty(value = "子订单号")
    private String subOrderNo;

    @ApiModelProperty(value = "订单类型(1-团购订单,2-报名订单,4-团购+报名订单,5积分订单)")
    private Integer orderType;

    @ApiModelProperty(value = "如果是多商户通用券，则为0，当核销成功之后，更新对应核销的商户id")
    private Long merchantId;

    @ApiModelProperty(value = "商品id/商户id(如果是多商户通用券，则会存在多个，使用英文逗号分割")
    private String goodsId;

    @ApiModelProperty(value = "活动商品id")
    private Long activeGoodsId;

    @ApiModelProperty(value = "是否是多商户通用券(1-否，2-是)")
    private Integer mulState;

    @ApiModelProperty(value = "商品名称")
    private String goodsName;

    @ApiModelProperty(value = "商品图片")
    private String goodsImgs;


    @ApiModelProperty(value = "商户商品价格")
    @JsonSerialize(using = Decimal2Serializer.class)
    private BigDecimal goodsPrice;

    @ApiModelProperty(value = "商品数量")
    private Integer goodsNum;

    @ApiModelProperty(value = "核销码")
    private String verifyCode;

    @ApiModelProperty(value = "商户订单本金(按比例分配的用户支付的订单款)")
    @JsonSerialize(using = Decimal2Serializer.class)
    private BigDecimal merchantAmt;

    @ApiModelProperty(value = "商户订单补贴(该订单商场补贴的金额)")
    @JsonSerialize(using = Decimal2Serializer.class)
    private BigDecimal merchantSubsidyAmt;

    @ApiModelProperty(value = "佣金")
    @JsonSerialize(using = Decimal2Serializer.class)
    private BigDecimal commissionAmt;

    @ApiModelProperty(value = "二级经纪人佣金")
    @JsonSerialize(using = Decimal2Serializer.class)
    private BigDecimal subAgentCommissionAmt;

    @ApiModelProperty(value = "红包补贴金额")
    @JsonSerialize(using = Decimal2Serializer.class)
    private BigDecimal redPacketAmt;


    @ApiModelProperty(value = "总补贴金额")
    @JsonSerialize(using = Decimal2Serializer.class)
    private BigDecimal totalSubsidyAmt;


    @ApiModelProperty(value = "分销订单金额")
    @JsonSerialize(using = Decimal2Serializer.class)
    private BigDecimal distributionOrderAmt;


    @ApiModelProperty(value = "可返还金额(核销后显示)")
    @JsonSerialize(using = Decimal2Serializer.class)
    private BigDecimal returnAmt;

    @ApiModelProperty(value = "订单状态(1-待核销，2-已核销，3-已取消，4-已过期)")
    private Integer subOrderState;

    @ApiModelProperty(value = "结算状态(1-未结算,2-已结算)")
    private Integer settleState;

    @ApiModelProperty(value = "下单时间")
    private LocalDateTime orderTime;

    @ApiModelProperty(value = "订单核销时间")
    private LocalDateTime verifyTime;

    @ApiModelProperty(value = "订单取消时间")
    private LocalDateTime cancelTime;

    @ApiModelProperty(value = "订单过期时间")
    private LocalDateTime expireTime;

    @ApiModelProperty(value = "订单结算时间")
    private LocalDateTime settleTime;

    @ApiModelProperty(value = "订单备注")
    private String orderNote;

    @ApiModelProperty(value = "报名信息(json)")
    private String enrollInfo;

    @ApiModelProperty(value = "核销方式（只对报名活动有效）：0-系统，1-票付通")
    private Integer verifyType;

    @ApiModelProperty(value = "票付通产品ID")
    private String pftProduct;

    @ApiModelProperty(value = "票付通门票ID")
    private String pftTicket;

    @ApiModelProperty(value = "票付通供应商ID")
    private String pftSupplier;

    @ApiModelProperty(value = "票付通订单号")
    private String pftOrder;

    @ApiModelProperty(value = "是否是零元购活动（1-不是，2-是）")
    private Integer zeroState;

    @ApiModelProperty(value = "下单用户可得积分")
    private BigDecimal userPointsAmt;

    @ApiModelProperty(value = "一级经纪人可得积分")
    private BigDecimal agentPointsAmt;

    @ApiModelProperty(value = "二级经纪人可得积分")
    private BigDecimal subAgentPointsAmt;

    @ApiModelProperty(value = "子单类型：1-商品 2-签到码")
    private Integer itemType;
}
